'use strict';

/**
 * 视频表种子数据
 */
module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.bulkInsert('videos', [
      {
        id: 1,
        user_id: 3, // content_creator 用户
        category_id: 1, // 动画分类
        title: '热门动画推荐：2025年必看新番',
        description: '本视频为大家推荐2025年最值得一看的几部热门动画作品，包含了各种不同风格的动画，总有一部适合你！',
        cover_url: 'https://via.placeholder.com/1280x720?text=动画推荐',
        video_url: 'https://example.com/videos/anime-recommendation.mp4',
        duration: 180, // 3分钟
        view_count: 1500,
        like_count: 89,
        coin_count: 45,
        collect_count: 32,
        share_count: 12,
        comment_count: 18,
        tags: '动画,推荐,新番,2025',
        status: 1, // 已发布
        created_at: new Date(),
        updated_at: new Date(),
        published_at: new Date()
      },
      {
        id: 2,
        user_id: 3,
        category_id: 2, // 音乐分类
        title: '零基础学吉他：和弦入门教程',
        description: '这是一套适合吉他初学者的和弦入门教程，从最基础的和弦开始，循序渐进地讲解和弦的按法和转换技巧。',
        cover_url: 'https://via.placeholder.com/1280x720?text=吉他教程',
        video_url: 'https://example.com/videos/guitar-basics.mp4',
        duration: 240, // 4分钟
        view_count: 2300,
        like_count: 156,
        coin_count: 78,
        collect_count: 124,
        share_count: 35,
        comment_count: 42,
        tags: '音乐,吉他,教程,初学者',
        status: 1,
        created_at: new Date(),
        updated_at: new Date(),
        published_at: new Date()
      },
      {
        id: 3,
        user_id: 3,
        category_id: 3, // 游戏分类
        title: '最新游戏评测：星际冒险',
        description: '今天为大家带来《星际冒险》这款新游戏的详细评测，包括游戏玩法、画面表现、音效等多方面的分析。',
        cover_url: 'https://via.placeholder.com/1280x720?text=游戏评测',
        video_url: 'https://example.com/videos/game-review.mp4',
        duration: 300, // 5分钟
        view_count: 3100,
        like_count: 210,
        coin_count: 143,
        collect_count: 87,
        share_count: 56,
        comment_count: 67,
        tags: '游戏,评测,星际,冒险',
        status: 1,
        created_at: new Date(),
        updated_at: new Date(),
        published_at: new Date()
      },
      {
        id: 4,
        user_id: 3,
        category_id: 4, // 科技分类
        title: '人工智能最新进展2025',
        description: '本视频介绍了2025年人工智能领域的最新研究进展和应用案例，探讨了AI技术如何改变我们的生活和工作方式。',
        cover_url: 'https://via.placeholder.com/1280x720?text=AI进展',
        video_url: 'https://example.com/videos/ai-progress.mp4',
        duration: 420, // 7分钟
        view_count: 4500,
        like_count: 345,
        coin_count: 210,
        collect_count: 189,
        share_count: 98,
        comment_count: 112,
        tags: '科技,人工智能,AI,2025',
        status: 1,
        created_at: new Date(),
        updated_at: new Date(),
        published_at: new Date()
      },
      {
        id: 5,
        user_id: 3,
        category_id: 5, // 生活分类
        title: '10分钟早餐食谱：健康又营养',
        description: '为忙碌的上班族和学生党准备的快速早餐食谱，只需10分钟就能做出健康又营养的美味早餐。',
        cover_url: 'https://via.placeholder.com/1280x720?text=早餐食谱',
        video_url: 'https://example.com/videos/breakfast-recipes.mp4',
        duration: 360, // 6分钟
        view_count: 5200,
        like_count: 432,
        coin_count: 256,
        collect_count: 312,
        share_count: 145,
        comment_count: 178,
        tags: '生活,美食,早餐,健康',
        status: 1,
        created_at: new Date(),
        updated_at: new Date(),
        published_at: new Date()
      }
    ], {});
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete('videos', null, {});
  }
};